<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
    <head>
        <title>Alignment - Join aligner</title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <link rel="stylesheet" type="text/css" href="/net/sf/mzmine/desktop/impl/helpsystem/HelpStyles.css">
    </head>
    <body>
        <h1>Join aligner</h1>

        <h2>Description</h2>

        <p>
            This method aligns detected peaks in different samples through a match score. This score is calculated
            based on the mass and retention time of each peak and ranges of tolerance stipulated in the parameters
            setup dialog.
        </p>

        <h4>Algorithm</h4>
        <p>
            The peak alignment algorithm uses: 
        </p>
        <p>
            1. a master list of peaks (L) against which every new sample (Sj) will be matched.
            When aligning peaks from multiple samples, the master list is initially set to the
            first sample, and subsequently it will be the combination of samples aligned thus far,
            with the samples as the columns and the matching peaks as the rows.
        </p>

        <p>
            2. for every row i in L, a two-dimensional window (where the window
            size is selected by the user), called Alignment window (AW) defining the ranges of m/z
            and RT and centered around the average of m/z and RT of all the individual peaks in the
            row; and
        </p>

        <p>
            3. a score function to compute the similarity of peaks between L and the new
            sample Sj inside the alignment window. The score function computes the similarity based on
            the similarities in m/z, retention time, and optionally on identification, and isotope patterns
            between the peaks to be matched. The score is calculated as follows:<br>  
            <i>score = ((1 - MZdifference / MZtolerance) &times; MZweight) + ((1 - RTdifference / RTtolerance) &times; RTweight)</i>
        </p>

        <p>
            The algorithm works as follows. It iterates through the rows of L, and for each row, it looks
            for peaks within the alignment window in Sj that has to be aligned with L. A score is calculated for
            each possible match and the pair getting the best score will be aligned.
        </p>

        <br>

        <h4>Method parameters</h4>

        <dl>
            <dt>Peak list name</dt>
            <dd>Name of the new aligned peak list</dd>
            <dt>m/z tolerance</dt>
            <dd>This value sets the range, in terms of m/z, for possible peaks to be
                aligned. Maximum allowed m/z difference</dd>
            <dt>Weight for m/z</dt>
            <dd>This is the assigned weight for m/z difference at the moment of match score calculation between peak rows.
                In case of perfectly matching m/z values the score receives the complete weight.</dd>
            <dt>Retention time tolerance type</dt>
            <dd>Maximum RT difference can be defined either using absolute or relative value</dd>
            <dt>Absolute RT tolerance</dt>
            <dd>Maximum allowed absolute RT difference</dd>
            <dt>Relative RT tolerance</dt>
            <dd>Maximum allowed relative RT difference</dd>
            <dt>Weight for RT</dt>
            <dd>This is the assigned weight for RT difference at the moment of match score calculation between peak rows.
                In case of perfectly matching RT values the score receives the complete weight.</dd>
            <dt>Require same charge state</dt>
            <dd>If checked, only rows having same charge (taken from best MS/MS spectra) can be aligned</dd>
            <dt>Require same ID</dt>
            <dd>If checked, only rows having same compound identities (or no identities) can be aligned.</dd>
            <dt>Compare isotope pattern</dt>
            <dd>If both peaks represent an isotope pattern, add isotope pattern score to match score.</dd>
            <dt>Isotope pattern score threshold level</dt>
            <dd>If the score between isotope pattern is lower, discard this match.</dd>
			<dt>Compare spectra similarity</dt>
            <dd>Compare MS1 or MS2 scans similarity. Select the mass list, m/z tolerance and spectra similarity score.
            For the score, set a minimum cos similarity. Only features meeting this criteria will be aligned.</dd>
            </dd>
        </dl>
       
        <p>
         New aligned peak list showing peaks from 3 different samples.<br>
         <img src="join_alignment_preview.jpg">
        </p>

    </body>
</html>
